/*
 * Copyright 2008 Zoundry LLC, Inc.  All Rights Reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package org.zoundry.gaedt.ui;

import org.eclipse.swt.graphics.Color;
import org.eclipse.ui.forms.widgets.FormToolkit;

/**
 * A util class for getting colors.
 */
public final class ZGaeColorUtil
{
    /**
     * Gets the color 'white' from the toolkit.
     *
     * @param aToolkit
     */
    public static Color white(FormToolkit aToolkit)
    {
        Color color = aToolkit.getColors().getColor("gae_white");
        if (color == null)
            color = aToolkit.getColors().createColor("gae_white", 255, 255, 255);
        return color;
    }

    /**
     * Gets the color to use for the foreground of labels in a form
     * editor.
     *
     * @param aToolkit
     */
    public static Color editorLabelForeground(FormToolkit aToolkit)
    {
        Color color = aToolkit.getColors().getColor("gae_editor_label_fg_color");
        if (color == null)
            color = aToolkit.getColors().createColor("gae_editor_label_fg_color", 49, 105, 198);
        return color;
    }
}
